import http from "@/utils/http";

export default {
  namespaced: true,

  state: {
    homeList: []
  },

  mutations: {
    SETHOMELIST(state, list) {
      state.homeList = list;
    }
  },

  actions: {
    getHomeList({ commit }) {
      let token=sessionStorage.getItem('token')
      http
        .post(
          `/api/login/add_balance/get_agent_select?token=${token}`
        )
        .then(response => {
          let res = response.data;
          commit("SETHOMELIST", res);
        });
    }
  }
};
